#include <config.h>
#include <linux/linkage.h>



ENTRY(d2000_system_off_entry)
	ldr x1, =(0xFB000000 - 0x1000)
	/*fix GD*/
	mov	x18, x1
	
	mov	x2, x1
	sub x2, x2, 0x1000
	mov	sp, x2

	b	pfdi_service_system_off
ENDPROC(d2000_system_off_entry)

ENTRY(d2000_system_reset_entry)
	ldr x1, =(0xFB000000 - 0x1000)
	/*fix GD*/
	mov	x18, x1
	
	mov	x2, x1
	sub x2, x2, 0x1000
	mov	sp, x2	

	b	pfdi_service_system_reset
ENDPROC(d2000_system_reset_entry)

ENTRY(d2000_suspend_finish_entry)
	ldr x1, =(0xFB000000 - 0x1000)
	/*fix GD*/
	mov	x18, x1

	mov	x2, x1
	sub x2, x2, 0x1000
	mov	sp, x2

	b	pfdi_service_suspend_finish
ENDPROC(d2000_suspend_finish_entry)

ENTRY(d2000_suspend_end_entry)
	ldr x1, =(0xFB000000 - 0x1000)
	/*fix GD*/
	mov	x18, x1
	
	mov	x2, x1
	sub x2, x2, 0x1000
	mov	sp, x2

	mov	sp, x1
	b	pfdi_service_suspend_end
ENDPROC(d2000_suspend_end_entry)

ENTRY(d2000_suspend_start_entry)
	ldr 	x3, =0x28001000
	mov 	w4, 'F'
	strb	w4, [x3]

	ldr x1, =(0x29820000 - 0x1000)
	/*fix GD*/
	mov	x18, x1
	
	mov	x2, x1
	sub x2, x2, 0x1000
	mov	sp, x2

	b	pfdi_service_suspend_start
ENDPROC(d2000_suspend_start_entry)

